// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import MonoSingle from "./MonoSingle";

const { ccclass, property, menu} = cc._decorator;

@ccclass
@menu("Utility/SetFingerEvent")
export default class SetFingerEvent extends cc.Component {
	
	@property
	isPushPanel: boolean = true

	@property
	pushTimer: number = 0.2
	@property
	popTimer: number = 0

	curPanel : cc.Node;

	onEnable()
	{
		this.curPanel = this.isPushPanel ? this.node:null;
		MonoSingle.GetTvBoxInput().pushRefreshPanel(this.pushTimer, this.curPanel);
		// MonoSingle.GetTvBoxInput().refreshPanel(0.1);
	}
	onDisable()
	{
		this.curPanel = this.isPushPanel ? this.node : null;
		MonoSingle.GetTvBoxInput().popRefreshPanel(this.popTimer, this.curPanel);
	}
}
